<!--
 * @Author: mhb
 * @Date: 2021-12-21 17:38:02
 * @LastEditTime: 2022-01-12 14:38:53
 * @LastEditors: Please set LastEditors
 * @Description: 成果评审详情信息弹窗
 * @FilePath: \cscec-pms-admin-3\src\views\quality\resultsManagement\QCActivityResult\components\ViewResultData.vue
-->
<template>
  <dialog-form
    ref="dialogForm"
    :visible.sync="visible"
    editModel="V"
    :footer="null"
    :form="form"
    headerTitle="成果评审详情信息"
    :width="800"
    :formList="formList"
  >
    <a-table
      slot="formFooter"
      rowKey="id"
      :dataSource="form.scoringDetails || []"
      :pagination="false"
      :columns="columns"
    >
    </a-table>
  </dialog-form>
</template>

<script>
import DialogForm from '@/components/DialogForm' // 表单弹窗

export default {
  name: 'ViewResultData',
  components: {
    DialogForm
  },
  props: {
    // 表单
    form: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {
      visible: false, //详情弹窗控件
      formList: [
        {
          span: 12,
          label: '课题名称',
          keyName: 'topicName'
        },
        {
          span: 12,
          label: '课题类型',
          keyName: 'topicTypeName'
        },
        {
          span: 12,
          label: '资料平均分',
          keyName: 'average'
        },
        {
          span: 12,
          label: '资料逾期扣分',
          keyName: 'deductPoints'
        },
        {
          span: 12,
          label: '资料得分',
          keyName: 'score'
        },
        {
          span: 12,
          label: '排名',
          keyName: 'sort'
        }
      ], // 表单列表
      columns: [
        {
          title: '评审人',
          dataIndex: 'personName',
          width: 80
        },
        {
          title: '评审总分',
          dataIndex: 'totalScore',
          width: 100
        },
        {
          title: '评审信息',
          dataIndex: 'reviewInformation',
          ellipsis: true
        }
      ] // 成果评审详情表头
    }
  }
}
</script>
